package com.management.service.Impl;

import com.management.dao.CompanyDao;
import com.management.po.Company;
import com.management.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author hrf
 * 公司的业务逻辑实现类
 */
@Service
public class CompanyServiceImpl implements CompanyService {

    @Autowired
    CompanyDao companyDao;

    @Override
    public List<Company> findAll() {
        return companyDao.findAll();
    }

    @Override
    public Company findByCompanyId(int companyId) {
        return companyDao.findByCompanyId(companyId);
    }

    @Override
    public int add(Company company) {
        return companyDao.add(company);
    }

    @Override
    public int update(Company company) {
        return companyDao.update(company);
    }
}
